// console.log(123);
// var a = 6;
// console.log('a->',a);
Page({
  data:{
    age:50,
    arr:[2,4,6],
    cat:{
      name:'加菲猫',
      age:4
    },
    showHonglou:true,
    arr2:[
      {name:"薛宝钗",age:17},
      {name:"孔乙己",age:170},
      {name:"a Q",age:117}
    ]
  },
  hit(e){
    console.log('e->',e);
  },
  hideshowfn(){
    this.setData({
      showHonglou:!this.data.showHonglou
    })
  },
  getAge1(){
    // 读取
    // console.log(this.data.age);
    // this.data.age = 88; //错误
    // 修改
    this.setData({
      age:77,
      "arr[1]":'鲁迅'
    })
  }
})
